﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html;charset=utf-8;" />

<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/inform.css"/>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/Homepage/style.css"/>
<script type="text/javascript" src="__PUBLIC__/js/jquery-1.11.0.min.js" ></script>

<style>

.sq_wrap { width:590px;margin:0 auto;color:#8a8686;font-size:16px;}
.sq_main { width:440px; margin:0 auto;}
.sq_main ul { margin-bottom:30px;}
.sq_main ul li {text-align:right;height:34px;line-height:34px;}
.sq_wrap h4{font-size:14px;color:#3c3c3c; text-align:left;margin:20px 0px;}
.sq_warn {color:red;text-align:center;font-size:12px;margin-bottom:15px;}
.sq_atitle { float:left;width:40%}
.sq_answears { float:left;}
.sq_custome_ques { display:none;}
.sq_answears input { width:255px;padding-left:5px;height:32px;line-height:32px;border:1px solid #9b9b9b;}
.sq_tip {color:#e46026;font-weight:bold;padding-left:10px;padding-top:20px;padding-bottom:15px;font-size:14px;}
.sq_tipinfor { width:90%; margin:0 auto;font-size:13px;}
.sq_tipinfor li {margin-bottom:10px;}
.sq_footer {padding-bottom:15px;}
.mbbn { text-align:center;}
.mbimg{cursor:pointer;}
</style>

<script type="text/javascript">
$(function(){

	$('#ques1,#ques2').change(function(){	
		if($(this).val()==9){
			$(this).parents('li').next('.sq_custome_ques').show();		
		}else{
			$(this).parents('li').next('.sq_custome_ques').hide();		
		
		}
	})
	
	$('.mbimg').click(function(){
	
		ans1 = $('.ans1').val();
		ans2 = $('.ans2').val();
		from =$('.from').val();
	
			
		  $.ajax({
             type: "POST",
             url: "{:U('setquestionCheck')}",
			 data: {from:from,ans1:ans1,ans2:ans2},
			 dataType: "json",
             success: function(data){
				if(data==1){
					message = "请回答密保问题1";
				}else if(data==2){
					message = "请回答密保问题2";
				}else if(data==3){
					message = "问题1答案错误";			
				}else if(data==4){
					message = "问题2答案错误";
				}else if(data==5){
					message = "验证成功";
					window.location.href="{:U('question')}"
				}
				 alert(message);
									}
			})		
		
	})
	

})

</script>
</head>

<body>
<div class="main_wrap">
<div class="home_menu" style="padding-bottom:40px;">
	<include file="Public:home_header" />
	<div style="clear:both"></div>
	<div class="zt" id="zt">
		<include file="Public/leftMenu" />
		
		<div class="yinfor">
			<div class="center_wrap">
				<div class="center_title"><h1>账户安全</h1></div>
				<div class="sq_wrap">
					<h4>密保验证</h4>
					<div class="sq_main">
						<form name="sq_form">
						<input type="hidden" name="from" class="from" value="1" />
						<ul>
							<li>
								<div class="sq_atitle">密保问题1：</div>
								<div class="sq_answears">{$q1}</div>
							</li>
						
							<li>
								<div class="sq_atitle">密保答案1：</div>
								<div class="sq_answears">
									<input type="text" name="ans1" class="ans1" />
								</div>
							</li>			
						</ul>
						<ul>
							<li>
								<div class="sq_atitle">密保问题2：</div>
								<div class="sq_answears">{$q2}</div>
							</li>
						
							<li>
								<div class="sq_atitle">密保答案2：</div>
								<div class="sq_answears">
									<input type="text" name="ans2" class="ans2" />
								</div>
							</li>	

							
						</ul>	
						</form>
						<div class="mbbn"><img class="mbimg" src="__PUBLIC__/img/mbbn.jpg" /></div>
					</div>
					

					<div class="mp_menu2 sq_footer">
						<p class="sq_tip">温馨提示</p>
						<ul class="sq_tipinfor">
							<li>1、密码保护功能可以保障您登录的安全，当密码发生问题时，帮您方便快捷的取回新密码。</li>
							<li>2、请您认真填写密码保护问题及答案，并且记住密码保护问题及答案，否则密码丢失，将无法取回。</li>
						</ul>

					</div>
				</div>
			</div>
		</div>

	</div>

</div>
	</div>
</body>

</html>